public class StringDemo8 {
    public static void main(String[] args) {
        StringBuilder sb=new StringBuilder();
        System.out.println(sb.capacity());//16
        System.out.println(sb.length());//0
        sb.append("ajdadasdsadasddfsddas");
        System.out.println(sb.capacity());//34
        System.out.println(sb.length());//21
        sb.append("ajdadasdsadasddfsddfsdfsdfsdfsdfdss");
        System.out.println(sb.capacity());//56
        System.out.println(sb.length());//56
    }
}
